<script lang="ts" setup>
    import {ref,reactive} from "vue"
    let slotName=ref("header1")
    let market=ref("shouye")
</script>
<template>
    <div>MyList上</div>

    <slot :name="slotName"></slot> <!-- 默认插槽 -->
    <slot name="footer"></slot> <!-- 默认插槽 -->
    
    <div>MyList下</div>
    <button @click="slotName='header'">切换插槽名</button>
    <hr>
    <slot :name="market"></slot>
    <button @click="market='shouye'">shouye</button>
    <button @click="market='shop'">shop</button>
    <button @click="market='mine'">mine</button>
    <button @click="market='shopCar'">car</button>
    

</template>
<style scoped>

</style>